package pl.gladiator.model;

import java.io.Serializable;
import java.util.Date;

public class Newsy implements Serializable{
	private static final long serialVersionUID = 1L;
	private Integer newsPk = -1;
	private String subject;
	private String contents;
	private Date newsDate;
	
	public Newsy(){}
	
	public Newsy(Integer newsPk, String subject, String contents, Date newsDate) {
		super();
		this.newsPk = newsPk;
		this.subject = subject;
		this.contents = contents;
		this.newsDate = newsDate;
	}

	public Integer getNewsPk() {
		return newsPk;
	}
	public void setNewsPk(Integer newsPk) {
		if(newsPk > 0)
			this.newsPk = newsPk;
	}
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getContents() {
		return contents;
	}
	public void setContents(String contents) {
		this.contents = contents;
	}
	public Date getNewsDate() {
		return newsDate;
	}
	public void setNewsDate(Date newsDate) {
		this.newsDate = newsDate;
	}
	
	@Override
	public String toString() {
		return "Newsy [newsPk=" + newsPk + ", subject=" + subject
				+ ", contents=" + contents + ", newsDate=" + newsDate + "]";
	}
	

}
